package lib.wzh.com.libcore.framework.utils;

import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author lib
 * @Date 2021/12/19 17:49
 * @ClassName DateUtils
 * @Version v1.0
 */

public class DateUtils {

    private DateUtils(){}

    public String dateToStr(Date date,String format){
        return DateUtil.format(date,format);
    }

    public String dateToStr(Date date){
        return DateUtil.format(date, DatePattern.NORM_DATETIME_PATTERN);
    }

    public String dateToStr(LocalDateTime date){
        return DateUtil.format(date, DatePattern.NORM_DATETIME_PATTERN);
    }

    public String dateToStr(LocalDateTime date,String format){
        return DateUtil.format(date,format);
    }





}
